package tomoto.io;

public class FileUtil {
	/**
	 * Returns the suffix part of the given file name.
	 * 
	 * @param filename file name (should not include path separators)
	 * @return suffix part of the file (not including dot), or null if there is
	 *         no dot in the file name. 
	 */
	public static String getSuffix(String filename) {
		int index = filename.lastIndexOf('.');
		if (index < 0) {
			return null;
		} else {
			return filename.substring(index + 1);
		}
	}
}
